<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/**
 * 캐쉬 조회와 구매를 담당
 */
class Cashpoint_model extends CI_Model {

	function __construct() {
		parent::__construct();

		$this->load->library('LogSql');
	}

	/**
	 * 충전금액별 캐쉬 리스트
	 */
	function select_cash_to_point_list() {
		log_message('debug',"#### Product_model::select_cash_to_point_list()");

		$query = $this->db->get('tb_cash_to_point') or $this->logsql->log_sql('error');
		$result = $query->result_array();
		
		$this->logsql->log_sql();
		$this->logsql->log_result($result);

		return $result;
	}

	/**
	 * 충전금액별 캐쉬 
	 */
	function get_cash_to_point($idx) {
		log_message('debug',"#### Product_model::get_cash_to_point($idx)");

		$this->db->where('idx', $idx);
		$query = $this->db->get('tb_cash_to_point') or $this->logsql->log_sql('error');
		$result = $query->row_array();
		
		$this->logsql->log_sql();
		$this->logsql->log_result($result);

		return $result;
	}
}

/* End of file cashpoint_model.php */
/* Location: ./application/models/product/package_model.php */